public class MyThread implements Runnable {
    //long timeLong = 0;// how long thread running will cost
    // TimeUnit timeUnit;

    public MyThread() {
    }

   /* public MyThread(long milli, TimeUnit timeUnit) {
        this.timeLong = milli;
        this.timeUnit = timeUnit;
    }*/

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(i);
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}  